Skip to content

[ISSUE-241] Fix Exception Type Raised in .flash()#243

Merged
hkpeprah merged 1 commit intomasterfrom
ford/ISSUE-241/exception
Jul 31, 2025
Merged

[ISSUE-241] Fix Exception Type Raised in .flash()#243
hkpeprah merged 1 commit intomasterfrom
ford/ISSUE-241/exception

Conversation

@hkpeprah
Copy link
Contributor

@hkpeprah hkpeprah commented Jul 30, 2025

[ISSUE-241] Fix Exception Type Raised in .flash()

Overview

This patch fixes the wrong exception being raised in the .flash() function; currently is JLinkEraseException(), is now JLinkFlashException().

This patch fixes the wrong exception being raised in the `.flash()`
function; currently is `JLinkEraseException()`, is now `JLinkFlashException()`.
@hkpeprah hkpeprah requested review from bbrown1867 and Copilot July 30, 2025 19:19
@hkpeprah hkpeprah self-assigned this Jul 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an incorrect exception type being raised in the .flash() method. The function was incorrectly raising JLinkEraseException instead of the more appropriate JLinkFlashException when the flash operation fails.

  • Corrects exception type from JLinkEraseException to JLinkFlashException in the flash method

res = self._dll.JLINKARM_EndDownload()
if res < 0:
raise errors.JLinkEraseException(res)
raise errors.JLinkFlashException(res)
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title contains a spelling error: 'excpetion' should be 'exception'.

Copilot uses AI. Check for mistakes.
@hkpeprah hkpeprah changed the title [ISSUE-241] Fix excpetion type raised in .flash() [ISSUE-241] Fix Exception Type Raised in .flash() Jul 30, 2025
@hkpeprah hkpeprah merged commit 122d34b into master Jul 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants